#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: path_conf.py 
@version:
@time: 2021/12/29 
"""
import os

from TapUtil.operatefile.path_operate import path_joint


class PathConf:
    # 项目根路径
    PROJECT_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
    # type mapping path
    TYPE_MAPPING = path_joint(PROJECT_PATH, 'typeMapping')
    # 运行日志路径
    LOG_PATH = path_joint(PROJECT_PATH, 'TapClientCore', 'T01_init_conf', 'tap-client-logs.txt')
    #     # current build number
    CURRENT_BUILD_NUMBER_PATH = path_joint(PROJECT_PATH, 'current_build_number.json')
    # env
    ALLURE_ENV = path_joint(PROJECT_PATH, 'environment.properties')
    #  init yml
    YML = path_joint(PROJECT_PATH, 'TapClientCore', 'T01_init_conf', 'init.yml')
    V1_YML = path_joint(PROJECT_PATH, 'TapClientCore', 'T01_init_conf', 'v1_init', 'v1_init.yml')
    V2_YML = path_joint(PROJECT_PATH, 'TapClientCore', 'T01_init_conf', 'v2_init', 'v2_init.yml')
    # v2 serve template
    SERVE_TEMPLATE = path_joint(PROJECT_PATH, 'TapClientCore', 'T01_init_conf', 'serve_template.yml', )
    # v2 Jenkins
    JENKINS = path_joint(PROJECT_PATH, 'TapClientCore', 'T01_init_conf', 'jenkins_config.yml', )
    # pytest 执行日志
    PYTEST_RESULT_PATH = path_joint(PROJECT_PATH, 'pytest_result.json')
    # 字段映射结果写入
    TYPE_MAPPING_JSON_RESULT = path_joint(TYPE_MAPPING, 'typeMappingResult.json')
    # 字段映射excel结果写入
    TYPE_MAPPING_EXCEL_RESULT = path_joint(TYPE_MAPPING, 'typeMappingExcel.xlsx')
    # 字段映射excel only type
    TYPE_MAPPING_EXCEL_ONLY_TYPE_RESULT = path_joint(TYPE_MAPPING, 'typeMappingExcelOnlyType.xlsx')
    # 字段映射excel only scope
    TYPE_MAPPING_EXCEL_ONLY_SCOPE_RESULT = path_joint(TYPE_MAPPING, 'typeMappingExcelOnlyScope.xlsx')
    # PDK_PATH
    TYPE_MAPPING_PDK_RESULT = path_joint(TYPE_MAPPING, 'TypesMappingReport.xlsx')
    TYPE_MAPPING_PDK_RESULT2 = path_joint(TYPE_MAPPING, 'TypesMappingReport_2.xlsx')
    TYPE_MAPPING_PDK_RESULT3 = path_joint(TYPE_MAPPING, 'TypesMappingReport_3.xlsx')
    TYPE_MAPPING_PDK_RESULT_COMPARE = path_joint(TYPE_MAPPING, 'TypesMappingReport_COMPARE.xlsx')
    # tap.py path
    TAP_CONNECTOR_PATH = path_joint(PROJECT_PATH, 'tap_for_client.py')
    # jar demo
    JAR_DEMO_PATH = path_joint(PROJECT_PATH, 'resource', 'demo-plugin-jar-1.0-SNAPSHOT.jar')
    # gbase-8s jar
    JAR_GBASE_8S_PATH = path_joint(PROJECT_PATH, 'resource', 'gbasedbtjdbc_3.3.0_2_36477d.jar')
    # dm jar
    JAR_DM_PATH = path_joint(PROJECT_PATH, 'resource', 'DmJdbcDriver18.jar')
    # king base 1
    JAR_KINGBASE_R3_PATH = path_joint(PROJECT_PATH, 'resource', 'kingbase8-8.2.0.jar')
    # king base 2
    JAR_KINGBASE_R6_PATH = path_joint(PROJECT_PATH, 'resource', 'kingbase8-8.6.0.jar')


if __name__ == '__main__':
    print(PathConf.LOG_PATH)
